<template>
  <div class="tpl48-hybird">
    <div
      class="modulePadding"
      :style="`padding-top:${tplItemData.modulePadding}px; padding-bottom:${tplItemData.modulePadding}px;`">
      <div class="hybird65">
        <ul class="clearfix">
          <li v-for="(item,index) in tplItemData.dataset" :key="index">
            <div class="title">{{ item.showtitle }}</div>
            <div class="subtitle">{{ item.subtitle }}</div>
            <a @click="openLink(item.link)">
              <img :src="item.pic" alt="">
            </a>
          </li>
        </ul>
      </div>
    </div>
    
  </div>
</template>

<script>
  import Vue from 'vue'
  import { openPage } from '@/utils/utils'
  export default Vue.extend({
    props: {
      tplItemData: {
        type: Object
      }
    },
    methods: {
      openLink(link) {
        openPage(link)
      },
    }
  })
</script>

<style lang="scss">
  @import "src/styles/mixin";
  .tpl48-hybird{
    .hybird65{
      overflow:hidden;
      border-radius:8px;
      background:#fff;
      li{
        float:left;
        width:50%;
        padding:3% 1.5% 5%;
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        &:nth-child(2n){
          margin-right:0;
        }
        img{
          display:block;
          width:100%;
        }
        .title{
          font-size:30px;
          color:#333;
        }
        .subtitle{
          padding:10px 0 16px;
          font-size:12px;
          color:#999;
        }
      }
    }
  
  }
</style>
